/*
 * Copyright (c)  2020,  DataPipeline
 * All rights reserved.
 *
 * Id:AttributeSelectBuilder.java   2020-07-18 17:07 wanglijun
 */
package cn.datacare.orm.annotation.builder;

import cn.datacare.orm.manager.impl.SQLManager;
import cn.datacare.orm.mapping.type.TypeParameter;

import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.sql.SQLException;

/**
 * <p>
 * Title: AttributeSelectBuilder
 * </p>
 * <p>
 * Description:  TypeParameter里对应ResultSet取出来，映射成特定对象返回
 * </p>
 * <p>
 * Copyright: Copyright (c) 2020
 * </p>
 * <p>
 * Company/Department: DataPipeline
 * </p>
 *
 * @author wanglijun
 * @version 1.0
 * @since 2020-07-18 17:07
 */
public interface AttributeSelectBuilder {
    /***
     * 查询数据
     * @param sqlManager
     * @param an
     * @param sqlId
     * @param typeParameter
     * @param property
     * @return
     * @throws SQLException
     */
    Object toObject(SQLManager sqlManager, Annotation an, String sqlId, TypeParameter typeParameter,
                    PropertyDescriptor property) throws SQLException;
}
